<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>问题管理</title>
<link href="./public/core/admin/css/base.css" rel="stylesheet" type="text/css" />
<script src="./public/core/admin/js/ask_admin.js"  type="text/javascript"></script>
<script language="javascript">
	function changeEdtor(obj){
		//alert(obj.value);
		url="?do=ask_admin&status=<?php echo $status;?>&tid=<?php echo $tid;?>&tid2=<?php echo $tid2;?>&editor="+obj.value;
		window.location.href=url;
	}
</script>
</head>

<body>
	<div class="bodytitle">
		<div class="bodytitleleft"></div>
		<div class="bodytitletxt"><a href='./ask/index.php' target='_blank'><b>问答模块</b></a> -- 用户提问管理</div>
	</div>
    <tr>
<td align='center' valign='top'>
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr bgcolor="#FFFFFF"><td height="4"></td></tr>
	</table>
<table width="98%" border="0" cellpadding="1" cellspacing="1" align="center" class="tbtitle" style="background:#E2F5BC;">
	<tr>
		<td height="24" colspan="10" align="left" background="img/tbg.gif">
		&nbsp;§<b>问题列表 &nbsp;  
		<a href="?do=ask_admin&status=0&tid=<?php echo $tid;?>&tid2=<?php echo $tid2;?>&editor=<?php echo $editor;?>" <?php if($status==0){echo "style=\"color:#0033FF\"";}?>>待解决</a> | 
		<a href="?do=ask_admin&status=1&tid=<?php echo $tid;?>&tid2=<?php echo $tid2;?>&editor=<?php echo $editor;?>" <?php if($status==1){echo "style=\"color:#0033FF\"";}?>>已解决</a> | 
		<a href="?do=ask_admin&status=2&tid=<?php echo $tid;?>&tid2=<?php echo $tid2;?>&editor=<?php echo $editor;?>" <?php if($status==2){echo "style=\"color:#0033FF\"";}?>>精彩问题</a> | 
		<a href="?do=ask_admin&status=-1&tid=<?php echo $tid;?>&tid2=<?php echo $tid2;?>&editor=<?php echo $editor;?>" <?php if($status==-1){echo "style=\"color:#0033FF\"";}?>>全部问题</a>  
		 &nbsp;&nbsp;&nbsp;&nbsp; 
		<select name="editor" onchange="javascript:changeEdtor(this.options[selectedIndex]);">
			<option value="all" <?php if($editor=="all") echo "selected='selected'"; ?>>所有编辑</option>
			<?php 
				foreach($editors as $key => $val){
					$selected = $key==$editor?"selected='selected'":" ";
					echo "<option value='$key'  ".$selected.">".$val."</option>";	
				}
			?>
		</select>
		 &nbsp;&nbsp;&nbsp;&nbsp;
		 <a href="?do=ask_admin&status=-1" style="color:#0033FF">返回所有问题</a></b> 
		</td>
	</tr>
	<form name="form2" action="?do=ask_admin">
	<tr height="22" align="center">
		<td  width="6%" bgcolor="#EDF9D5">id</td>
		<td width="4%" bgcolor="#EDF9D5">选择</td>
		<td width="28%" bgcolor="#EDF9D5">问题标题</td>
		<td width="8%" bgcolor="#EDF9D5">所属大分类</td>
		<td width="8%" bgcolor="#EDF9D5">所属小分类</td>
		<td width="7%" bgcolor="#EDF9D5">提问时间</td>
		<td width="9%" bgcolor="#EDF9D5">回答专家</td>
		<td width="6%" bgcolor="#EDF9D5">推荐</td>
		<td width="6%" bgcolor="#EDF9D5">问题状态</td>
		<td width="4%" bgcolor="#EDF9D5">编辑回答</td>
	</tr>
{dede:datalist}
	<?php
		if($fields['status'] == 0){
			$kind = '待解决';
		}else if($fields['status'] == 1){
			$kind = '<span style="color:#CC6633">已解决</span>';
		}else if($fields['status'] == 2 ){
			$kind = '<span style="color:#FF0000">精彩</span>';
		}else if($fields['status'] == -1){
			$kind = '<span style="color:#0033CC">回收站</span>';
		}
		$fields['digest']=$fields['digest']==0?"":"<span style=\"color:#6600CC\">推荐</span>";
		$fields['dateline'] = gmdate('Y-m-d' , $fields['dateline'] + 3600*8);
	?>
	<tr align='center' bgcolor="#FFFFFF"  onmousemove="javascript:this.bgColor='#FCFDEE';" onmouseout="javascript:this.bgColor='#FFFFFF';" height="22" >
		<td><?php echo $fields['id']; ?></td>
		<td><input name="askid" type="checkbox" id="id" value="<?php echo $fields['id']; ?>" class='np' /></td>
		<td align='left'><a href="./ask/question.php?id=<?php echo $fields['id']; ?>" target="_blank"><?php echo $fields['title']; ?></a></td>
		<td><a href="?do=ask_admin&tid=<?php echo $fields['tid']; ?>"><?php echo $fields['tidname']; ?></a> </td>
		<td><a href="?do=ask_admin&tid2=<?php echo $fields['tid2']; ?>"><?php echo $fields['tid2name']; ?></a></td>
		<td><?php echo $fields['dateline']; ?></td>
		<td><?php echo $fields['ans_uname'];?>&nbsp;</td>
		<td><?php echo $fields['digest']; ?></td>
		<td><?php echo $kind; ?></td>
		<td><a href="?do=ask_answer_me&id=<?php echo $fields['id'];?>" ><img src="./public/core/admin/images/file_edit.gif" /></a></td>
	</tr>
{/dede:datalist}
	<tr bgcolor="#F8FBFB"><td height="24" colspan="10" align="left">&nbsp;
		<a href="javascript:selAll()" class="coolbg">全选</a>
		<a href="javascript:noSelAll()" class="coolbg">取消</a>&nbsp;&nbsp;&nbsp;
		<a href="javascript:digestask(0)" class="coolbg">推荐</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
		<a href="javascript:dealask(0)" class="coolbg">已解决</a>&nbsp;
		<a href="javascript:goodask(0)" class="coolbg">精彩</a>&nbsp;
		<!--<a href="javascript:holdask(0)" class="coolbg">回收站</a>&nbsp;-->
		<a href="javascript:deleteask(0)" class="coolbg">删除</a>&nbsp;
	</td></tr>
	</form>
	<tr align="right" bgcolor="#E5F9FF">
		<td height="20" colspan="10" align="center" bgcolor="#EDF9D5">
		{dede:pagelist /}
		</td>
	</tr>
</table>
</td>
</tr>
</body>
</html>